package com.bionic.banking.core.entity;

import java.io.Serializable;

public class BankTransactionType implements Serializable {

    private Integer txTypeId;
    private String name;    
    private String description;

    public BankTransactionType() {
    }

    public Integer getTxTypeId() {
        return txTypeId;
    }

    public void setTxTypeId(Integer txTypeId) {
        this.txTypeId = txTypeId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (txTypeId != null ? txTypeId.hashCode() : 0);

        final int multiplier = 23;
        if (hash == 0) {
            int code = 133;
            code = multiplier * code + name.hashCode();
            hash = code;
        }
        return hash;
    }

    @Override
    public boolean equals(Object object) {        
        if (!(object instanceof BankTransactionType)) {
            return false;
        }
        BankTransactionType other = (BankTransactionType) object;
        return this.name.toLowerCase().equals(other.name.toLowerCase());        
    }

    @Override
    public String toString() {
        return description;
    }
}
